from fdfs_client.client import Fdfs_client, get_tracker_conf

# import sys
# import os, json
# import django
# from pprint import pprint
#
# sys.path.append("..")
# sys.path.append("../utils")
# os.environ.update({"DJANGO_SETTINGS_MODULE": "server.settings"})
# django.setup()
from conf.sysConfig import config

FastDFS_config = config['FastDFS_config']
tracker_path = get_tracker_conf(FastDFS_config)

if __name__ == '__main__':
    client = Fdfs_client(tracker_path)
    # ret = client.upload_by_filename('E:\\code\\ckgit\\server\\requirements.txt')
    ret = client.upload_by_filename('/home/ckgit/server/requirements.txt')
    print(ret)
